﻿Imports Microsoft.VisualBasic

Public Class DBSupplierSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public SupplierID As New TableField("SupplierID", Data.SqlDbType.Int)
    Public SupplierName As New TableField("SupplierName", Data.SqlDbType.NVarChar)
    Public Mobile As New TableField("Mobile", Data.SqlDbType.NVarChar)
    Public Tel As New TableField("Tel", Data.SqlDbType.NVarChar)
    Public Address As New TableField("Address", Data.SqlDbType.NVarChar)
    Public WebAddress As New TableField("WebAddress", Data.SqlDbType.NVarChar)
    Public Email As New TableField("Email", Data.SqlDbType.NVarChar)
    Public BankID As New TableField("BankID", Data.SqlDbType.NVarChar)
    Public BankAccountsID As New TableField("BankAccountsID", Data.SqlDbType.NVarChar)

    Sub New()
        MyBase.StoredProcedureName = "SupplierSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal SupplierID As String = "", _
                                 Optional ByVal SupplierName As String = "", _
                                 Optional ByVal Mobile As String = "", _
                                 Optional ByVal Tel As String = "", _
                                 Optional ByVal Address As String = "", _
                                 Optional ByVal WebAddress As String = "", _
                                 Optional ByVal Email As String = "", _
                                 Optional ByVal BankID As String = "", _
                                 Optional ByVal BankAccountsID As String = "") As Object
        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.SupplierID.SetValue(SupplierID, MyBase.FieldsArrayList)
        Me.SupplierName.SetValue(SupplierName, MyBase.FieldsArrayList)
        Me.Mobile.SetValue(Mobile, MyBase.FieldsArrayList)
        Me.Tel.SetValue(Tel, MyBase.FieldsArrayList)
        Me.Address.SetValue(Address, MyBase.FieldsArrayList)
        Me.WebAddress.SetValue(WebAddress, MyBase.FieldsArrayList)
        Me.Email.SetValue(Email, MyBase.FieldsArrayList)
        Me.BankID.SetValue(BankID, MyBase.FieldsArrayList)
        Me.BankAccountsID.SetValue(BankAccountsID, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
